﻿using STF.Blog.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace STF.Blog.IService
{
    /// <summary>
    /// 文章类别表
    /// </summary>
    public interface ICategoryService
    {
        public Task<int> AddCategoryAsync(string title,int parentId);
        public Task<int> UpdateCategoryAsync(int id, string title, int parentId);
        public Task<int> PutTrashAsync(int id);
        public Task<int> RestoreAsync(int id);
        public Task<int> DeleteCategoryAsync(int id);
        public Task<List<CategoryDto>> GetAllCategoryAsync(int deleteId = 1);
        public Task<List<CategoryDto>> GetByNameAsync(string title, int deleteId = 1);
        public Task<CategoryDto> GetByIdAsync(int id);
        public Task<List<CategoryDto>> GetByParentIdAsync(int parentId, int deleteId = 1);
    }
}
